#pragma once

#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int HPDataType;

typedef struct Heap
{
	HPDataType* a;
	int size;
	int capacity;
}hp;

void HeapInit(hp* php);
void HeapPush(hp* php, HPDataType x);
void AdjustUp(HPDataType* a, int child);
void HeapPop(hp* php);
void AdjustDown(HPDataType* a,int size, int father);
void HeapSort(HPDataType* a, int size);
